<script setup>

import {useStore} from "vuex";

const store = useStore();

const props = defineProps({
  show: {
    type: Boolean,
    default: true
  },
  note: {
    type: Object,
    default: () => ({})
  },
})
const emit = defineEmits(['confirm','close'])
const confirm = ()=>{
  emit('confirm')
}
const close = () => {
  emit('close')
}

</script>

<template>
  <van-dialog v-model:show="show" show-cancel-button @confirm="confirm" @cancel="close" :showCancelButton="false" confirmButtonText="复制微信">
    <div style="padding: 20px">
      <div class="m-center-card__title">
        <div class="m-center-card__title-text">
          {{store.getters.getNote.noteContent}}
        </div>
        <div class="m-center-card__title-date">
          {{store.getters.getNote.datetime}}
        </div>
      </div>
      <div class="m-center-card__content">
        <div class="m-center-card__content-text">
          <van-image v-for="url in store.getters.getNote.noteImg" radius="10" :src="'http://127.0.0.1:8080/file/url/img/'+url"/>
        </div>
      </div>
    </div>
  </van-dialog>
</template>

<style lang="less" scoped>
.m-center-card__title {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}
.m-center-card__title-text{
  font-size: 0.5rem;
  font-weight: bold;
}
.m-center-card__title-date{
  font-size: 0.8rem;
  color: #999;
}
.m-center-card__content{
  padding: 20px 0;
}
.m-center-card__content-text{
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #999;
  .van-image {
    height: 75px;
    width: 75px;
  }
}
</style>
